Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
Remove cleaning script from tests (#58)
Browse files Browse the repository at this point in the history
* Remove cleaning script from tests

* Remove unnecessary imports
  • Loading branch information
lucaswadedavis authored Jan 14, 2021
1 parent aef443c commit 4b4e1db
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 310 deletions.
218 changes: 0 additions & 218 deletions samples/test/clean.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@

const path = require('path');
const {assert} = require('chai');
const {after, before, describe, it} = require('mocha');
const {after, describe, it} = require('mocha');
const uuid = require('uuid').v4;
const cp = require('child_process');
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
const cwd = path.join(__dirname, '..');
const clean = require('./clean');

const aiplatform = require('@google-cloud/aiplatform');
const clientOptions = {
Expand All @@ -43,10 +42,6 @@ const project = process.env.CAIP_PROJECT_ID;
let batchPredictionJobId;

describe('AI platform create batch prediction job video classification', () => {
before('should clean up any orphaned resources', async () => {
await clean.cleanBatchPredictionJobs(project);
});

it('should create a video classification batch prediction job', async () => {
const stdout = execSync(
`node ./create-batch-prediction-job-video-classification.js \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@

const path = require('path');
const {assert} = require('chai');
const {after, before, describe, it} = require('mocha');
const {after, describe, it} = require('mocha');
const uuid = require('uuid').v4;
const cp = require('child_process');
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
const cwd = path.join(__dirname, '..');
const clean = require('./clean');

const aiplatform = require('@google-cloud/aiplatform');
const clientOptions = {
Expand All @@ -43,10 +42,6 @@ const project = process.env.CAIP_PROJECT_ID;
let batchPredictionJobId;

describe('AI platform create batch prediction job video object tracking', () => {
before('should clean up any orphaned resources', async () => {
await clean.cleanBatchPredictionJobs(project);
});

it('should create a video object tracking batch prediction job', async () => {
const stdout = execSync(
`node ./create-batch-prediction-job-video-object-tracking.js \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
'use strict';

const {assert} = require('chai');
const {after, before, describe, it} = require('mocha');
const clean = require('./clean');
const {after, describe, it} = require('mocha');

const uuid = require('uuid').v4;
const cp = require('child_process');
Expand All @@ -42,10 +41,6 @@ const project = process.env.CAIP_PROJECT_ID;
let trainingPipelineId;

describe('AI platform create training pipeline image classification', () => {
before('should delete any old and/or orphaned resources', async () => {
await clean.cleanTrainingPipelines(project);
});

it('should create a new image classification training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-image-classification.js ${datasetId} ${modelDisplayName} ${trainingPipelineDisplayName} ${project} ${location}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

const path = require('path');
const {assert} = require('chai');
const clean = require('./clean');
const {after, before, describe, it} = require('mocha');
const {after, describe, it} = require('mocha');

const uuid = require('uuid').v4;
const cp = require('child_process');
Expand All @@ -44,13 +43,6 @@ const project = process.env.CAIP_PROJECT_ID;
let trainingPipelineId;

describe('AI platform create training pipeline image object detection', () => {
before(
'should get the current project ID and clean up orphaned resources',
async () => {
await clean.cleanTrainingPipelines(project);
}
);

it('should create a new image object detection training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-image-object-detection.js \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

const path = require('path');
const {assert} = require('chai');
const {after, before, describe, it} = require('mocha');
const clean = require('./clean');
const {after, describe, it} = require('mocha');

const uuid = require('uuid').v4;
const cp = require('child_process');
Expand All @@ -45,13 +44,6 @@ const project = process.env.CAIP_PROJECT_ID;
let trainingPipelineId;

describe('AI platform create training pipeline tables classification', () => {
before(
'should get the project ID and clean up orphaned resources',
async () => {
await clean.cleanTrainingPipelines(project);
}
);

it('should create a new tables classification training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-tabular-classification.js \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

const path = require('path');
const {assert} = require('chai');
const {after, before, describe, it} = require('mocha');
const clean = require('./clean');
const {after, describe, it} = require('mocha');

const uuid = require('uuid').v4;
const cp = require('child_process');
Expand All @@ -45,12 +44,6 @@ const project = process.env.CAIP_PROJECT_ID;
let trainingPipelineId;

describe('AI platform create training pipeline tabular regression', () => {
before(
'should get the project ID and clean up orphaned resources',
async () => {
await clean.cleanTrainingPipelines(project);
}
);
it('should create a new tabular regression training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-tabular-regression.js \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

const path = require('path');
const {assert} = require('chai');
const {after, before, describe, it} = require('mocha');
const clean = require('./clean');
const {after, describe, it} = require('mocha');

const uuid = require('uuid').v4;
const cp = require('child_process');
Expand All @@ -44,9 +43,6 @@ const project = process.env.CAIP_PROJECT_ID;
let trainingPipelineId;

describe('AI platform create training pipeline text classification', () => {
before('should get the project ID and clean orphaned resources', async () => {
await clean.cleanTrainingPipelines(project);
});
it('should create a new text classification training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-text-classification.js \
Expand Down
Loading

0 comments on commit 4b4e1db

Please sign in to comment.