Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run test setup in the Up command #31

Merged
merged 1 commit into from
Aug 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions kubetest2-gke/deployer/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,11 @@ func (d *deployer) Up() error {
}

if err := eg.Wait(); err != nil {
return err
return fmt.Errorf("error creating clusters: %v", err)
}

if err := d.testSetup(); err != nil {
return fmt.Errorf("error running setup for the tests: %v", err)
}

return nil
Expand Down Expand Up @@ -399,7 +403,7 @@ export KUBE_NODE_OS_DISTRIBUTION='%[3]s'
return nil
}

func (d *deployer) TestSetup() error {
func (d *deployer) testSetup() error {
if d.testPrepared {
// Ensure setup is a singleton.
return nil
Expand All @@ -418,6 +422,7 @@ func (d *deployer) TestSetup() error {
if err := d.getInstanceGroups(); err != nil {
return err
}

if err := d.ensureFirewall(project, cluster, d.network); err != nil {
return err
}
Expand Down