Skip to content

Commit

Permalink
debug why this is failing on CI
Browse files Browse the repository at this point in the history
Signed-off-by: Carolyn Van Slyck <[email protected]>
  • Loading branch information
carolynvs committed Oct 1, 2021
1 parent c5854df commit 7bcfcdb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/smoke/desiredstate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package smoke
import (
"path/filepath"
"testing"
"time"

"get.porter.sh/porter/pkg/yaml"
"get.porter.sh/porter/tests"
Expand All @@ -22,7 +23,10 @@ func TestDesiredState(t *testing.T) {
defer test.Teardown()
require.NoError(t, err, "test setup failed")

time.Sleep(15 * time.Second)

test.PrepareTestBundle()
/*
test.Chdir(test.TestDir)
// Try to import an installation with an invalid schema
Expand Down Expand Up @@ -89,4 +93,5 @@ func TestDesiredState(t *testing.T) {
_, output, err = test.RunPorter("installation", "apply", "mybuns.yaml", "--namespace", "operator")
require.NoError(t, err)
tests.RequireOutputContains(t, output, "The installation is out-of-sync, running the upgrade action")
*/
}
5 changes: 5 additions & 0 deletions tests/tester/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package tester

import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"strings"
Expand All @@ -17,6 +18,7 @@ var testBundleBuilt = false

// PrepareTestBundle ensures that the mybuns test bundle has been built.
func (t Tester) PrepareTestBundle() {
fmt.Println("Preparing test bundle...")
// These are environment variables referenced by the mybuns credential set
os.Setenv("USER", "porterci")
os.Setenv("ALT_USER", "porterci2")
Expand All @@ -26,8 +28,11 @@ func (t Tester) PrepareTestBundle() {
t.MakeTestBundle(testdata.MyBuns, testdata.MyBunsRef)

// Import a parameter and credential set for the bundle into the global namespace
fmt.Println("Adding mybuns parameter set")
t.RequirePorter("parameters", "apply", filepath.Join(t.RepoRoot, "tests/testdata/params/mybuns.yaml"), "--namespace=")
fmt.Println("Adding mybuns credential set")
t.RequirePorter("credentials", "apply", filepath.Join(t.RepoRoot, "tests/testdata/creds/mybuns.yaml"), "--namespace=")
fmt.Println("Test bundle is ready!")
}

func (t Tester) MakeTestBundle(name string, ref string) {
Expand Down

0 comments on commit 7bcfcdb

Please sign in to comment.