Skip to content

Commit

Permalink
PipelineList tests, fix clearing error banner (#50)
Browse files Browse the repository at this point in the history
* wip pipeline list tests

* wip pipeline list tests

* more tests

* delete tests

* upload tests, safe setstate

* cleanup

* merge master

* pr comments

* pr comments

* add missing clearBanner in a bunch of places
  • Loading branch information
yebrahim authored and k8s-ci-robot committed Nov 6, 2018
1 parent 7888a7a commit e6dbfac
Show file tree
Hide file tree
Showing 25 changed files with 4,615 additions and 3,855 deletions.
28 changes: 1 addition & 27 deletions frontend/mock-backend/mock-api-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ const v1beta1Prefix = '/apis/v1beta1';

let tensorboardPod = '';

let apiServerReady = false;

// Simulate API server not ready for 5 seconds
setTimeout(() => {
apiServerReady = true;
}, 5000);

// tslint:disable-next-line:no-default-export
export default (app: express.Application) => {

Expand All @@ -63,11 +56,7 @@ export default (app: express.Application) => {
app.use(express.json());

app.get(v1beta1Prefix + '/healthz', (_, res) => {
if (apiServerReady) {
res.send({ apiServerReady });
} else {
res.status(404).send();
}
res.send({ apiServerReady: true });
});

app.get('/hub/', (_, res) => {
Expand All @@ -94,11 +83,6 @@ export default (app: express.Application) => {
}

app.get(v1beta1Prefix + '/jobs', (req, res) => {
if (!apiServerReady) {
res.status(404).send();
return;
}

res.header('Content-Type', 'application/json');
// Note: the way that we use the next_page_token here may not reflect the way the backend works.
const response: ApiListJobsResponse = {
Expand Down Expand Up @@ -141,11 +125,6 @@ export default (app: express.Application) => {
});

app.get(v1beta1Prefix + '/experiments', (req, res) => {
if (!apiServerReady) {
res.status(404).send();
return;
}

res.header('Content-Type', 'application/json');
// Note: the way that we use the next_page_token here may not reflect the way the backend works.
const response: ApiListExperimentsResponse = {
Expand Down Expand Up @@ -426,11 +405,6 @@ export default (app: express.Application) => {
});

app.get(v1beta1Prefix + '/pipelines', (req, res) => {
if (!apiServerReady) {
res.status(404).send();
return;
}

res.header('Content-Type', 'application/json');
const response: ApiListPipelinesResponse = {
next_page_token: '',
Expand Down
110 changes: 55 additions & 55 deletions frontend/mock-backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e6dbfac

Please sign in to comment.