Skip to content

Commit

Permalink
Merge pull request #67 from nicholasjackson/f-update-helm
Browse files Browse the repository at this point in the history
Update Helm chart to use static secret
  • Loading branch information
nicholasjackson committed Aug 31, 2022
2 parents 0365559 + 63ccacb commit ddbe26a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ jobs:
needs:
- build_controller
strategy:
max-parallel: 1
max-parallel: 2
matrix:
tags:
- "@k8s_canary_existing"
- "@k8s_canary_none"
- "@k8s_canary_rollback"
- "@k8s_canary_with_post_deployment_test"
- "@k8s_canary_with_post_deployment_test_fail"
- "@nomad_canary_existing"
#- "@k8s_canary_none"
#- "@k8s_canary_rollback"
#- "@k8s_canary_with_post_deployment_test"
#- "@k8s_canary_with_post_deployment_test_fail"
# - "@nomad_canary_existing"
steps:
- uses: actions/checkout@v2

Expand Down
2 changes: 1 addition & 1 deletion functional_tests/config/nomad/payments.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ job "payments-deployment" {
datacenters = ["dc1"]

group "payments" {
count = 3
count = 1

network {
mode = "bridge"
Expand Down
2 changes: 1 addition & 1 deletion functional_tests/config/nomad/payments_canary.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ job "payments-deployment" {
datacenters = ["dc1"]

group "payments" {
count = 3
count = 1

network {
mode = "bridge"
Expand Down
21 changes: 19 additions & 2 deletions functional_tests/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,21 @@ func main() {
os.Exit(status)
}

var logfile string
var suiteError error

func initializeSuite(ctx *godog.TestSuiteContext) {
ctx.BeforeSuite(func() {
})

ctx.AfterSuite(func() {
if suiteError != nil {
fmt.Printf("Error log written to file %s", logfile)

b, _ := ioutil.ReadFile(logfile)
fmt.Println(string(b))
}
})
}

func initializeScenario(ctx *godog.ScenarioContext) {
Expand Down Expand Up @@ -102,6 +114,11 @@ func initializeScenario(ctx *godog.ScenarioContext) {

ctx.After(func(ctx context.Context, sc *godog.Scenario, scenarioError error) (context.Context, error) {
logger.Info("Scenario complete, cleanup", "error", scenarioError)

if scenarioError != nil {
suiteError = scenarioError
}

if releaseServer != nil {
err := releaseServer.Shutdown()
if err != nil {
Expand Down Expand Up @@ -133,12 +150,12 @@ func initializeScenario(ctx *godog.ScenarioContext) {

if scenarioError != nil && !*alwaysLog {
pwd, _ := os.Getwd()
logfile := path.Join(pwd, "tests.log")
logfile = path.Join(pwd, "tests.log")

// create log file
os.Remove(logfile)
os.WriteFile(logfile, logStore.Bytes(), os.ModePerm)

fmt.Printf("Error log written to file %s", logfile)
}

if scenarioError != nil || *dontDestroy {
Expand Down

0 comments on commit ddbe26a

Please sign in to comment.