Skip to content

Commit

Permalink
Upgraded test chart to v2 api version
Browse files Browse the repository at this point in the history
  • Loading branch information
bdun1013 committed Mar 4, 2020
1 parent ade74d2 commit c96464b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion __fixtures__/basic/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
apiVersion: v2
description: A basic example chart to demonstrate unittest plugin
name: basic
version: 0.1.0
10 changes: 9 additions & 1 deletion __fixtures__/with-subchart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
apiVersion: v1
apiVersion: v2
description: An example chart with customized subchart
name: parent-chart
version: 0.1.0
dependencies:
- name: postgresql
repository: https://kubernetes-charts.storage.googleapis.com
version: 0.8.3
- name: postgresql
repository: https://kubernetes-charts.storage.googleapis.com
version: 0.8.3
alias: another-postgresql
2 changes: 1 addition & 1 deletion __fixtures__/with-subchart/charts/child-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
apiVersion: v2
description: An customized subchart
name: child-chart
version: 0.1.0
9 changes: 0 additions & 9 deletions __fixtures__/with-subchart/requirements.lock

This file was deleted.

8 changes: 0 additions & 8 deletions __fixtures__/with-subchart/requirements.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions unittest/test_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package unittest_test

import (
"bytes"
"fmt"
"regexp"
"sort"
"strings"
Expand Down Expand Up @@ -64,6 +65,7 @@ func TestRunnerOkWithPassedTests(t *testing.T) {
},
}
passed := runner.Run([]string{"../__fixtures__/basic"})
fmt.Println(buffer.String())
assert.True(t, passed)
cupaloy.SnapshotT(t, makeOutputSnapshotable(buffer.String())...)
}
Expand Down Expand Up @@ -91,6 +93,7 @@ func TestRunnerWithTestsInSubchart(t *testing.T) {
},
}
passed := runner.Run([]string{"../__fixtures__/with-subchart"})
fmt.Println(buffer.String())
assert.True(t, passed)
cupaloy.SnapshotT(t, makeOutputSnapshotable(buffer.String())...)
}
Expand All @@ -105,6 +108,7 @@ func TestRunnerWithTestsInSubchartButFlagFalse(t *testing.T) {
},
}
passed := runner.Run([]string{"../__fixtures__/with-subchart"})
fmt.Println(buffer.String())
assert.True(t, passed)
cupaloy.SnapshotT(t, makeOutputSnapshotable(buffer.String())...)
}

0 comments on commit c96464b

Please sign in to comment.