public function tearDown() { // Delete local files $finder = new Finder(); $fs = new Filesystem(); $fs->remove($finder->files()->in($this->tmpDir . "/download")); $fs->remove($finder->files()->in($this->tmpDir)); $fs->remove($this->tmpDir . "/download"); $fs->remove($this->tmpDir); // Delete file uploads $options = new ListFilesOptions(); $options->setTags(["docker-bundle-test"]); $files = $this->client->listFiles($options); foreach ($files as $file) { $this->client->deleteFile($file["id"]); } if ($this->client->bucketExists("in.c-docker-test")) { // Delete tables foreach ($this->client->listTables("in.c-docker-test") as $table) { $this->client->dropTable($table["id"]); } // Delete bucket $this->client->dropBucket("in.c-docker-test"); } if ($this->client->bucketExists("in.c-docker-test-redshift")) { // Delete tables foreach ($this->client->listTables("in.c-docker-test-redshift") as $table) { $this->client->dropTable($table["id"]); } // Delete bucket $this->client->dropBucket("in.c-docker-test-redshift"); } }
/** * */ protected function clearFileUploads() { // Delete file uploads $options = new ListFilesOptions(); $options->setTags(array("tde-exporter-php-test")); $files = $this->client->listFiles($options); foreach ($files as $file) { $this->client->deleteFile($file["id"]); } }