Skip to content

Commit d1d6898

Browse files
author
parisb
committed
ci: entry crit dependency
1 parent e4969e1 commit d1d6898

File tree

5 files changed

+47
-11
lines changed

5 files changed

+47
-11
lines changed

.github/copilot-instructions.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ When testing unexported methods or functions, these tests should be created in a
1111

1212
Wherever the tested method or function uses the afero package, always use a memmap fs as the filesystem in tests (i.e. don't write to disk where this can be avoided.).
1313

14-
When writing assertions in tests, do not abstract assertion/verification logic into functions stores in test cases, explicitly define the assertion or verification logic in the "Assert" portion of the test; use conditional logic if needed here. Use testify require (not testify assert) when checking for the presence or absence of errors.
14+
When writing assertions in tests, do not abstract assertion/verification logic into functions stores in test cases, explicitly define the assertion or verification logic in the "Assert" portion of the test; use conditional logic if needed here. Use testify require (not testify assert) when checking for the presence or absence of errors. Use assert.Len when asserting the length of objects.
1515

1616
When creating a test file, the package name should always be the package name with "\_test" appended.
1717

18-
When creating or satisfying a slog logger on services, always use the DiscardHandler
18+
When creating or satisfying a slog logger on services, always use the DiscardHandler.
1919

2020
<!-- Style -->
2121

2222
Any comments you include above functions or types should end with a period.
23+
24+
<!-- Code Quality -->
25+
26+
When generating go code, avoid variable name shadowing.

.github/workflows/pr.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ name: PR
66
on:
77
push:
88
branches: ["main"]
9+
910
pull_request:
1011
branches: ["main"]
1112

@@ -15,11 +16,9 @@ jobs:
1516
steps:
1617
- uses: actions/checkout@v4
1718
- uses: wagoid/commitlint-github-action@v6
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-python@v3
20-
- uses: pre-commit/[email protected]
2119

2220
build:
21+
needs: entry
2322
runs-on: ubuntu-latest
2423
steps:
2524
- name: Install Task

cmd/features/project.feature

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,3 @@ Scenario Outline: using SourceSets (defined in a local .sources.yaml) using diff
99
Examples:
1010
| sourceSet | authType | flagString | valuesFile |
1111
| terraformChildSet | ssh | --token | values.yaml |
12-
13-
14-
Scenario Outline: title
15-
Given context
16-
When event
17-
Then outcome

cmd/values_test.go

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//go:build integration
2+
3+
package cmd_test
4+
5+
import (
6+
"io"
7+
"testing"
8+
9+
"github.com/cucumber/godog"
10+
"github.com/spf13/cobra"
11+
)
12+
13+
func TestValues(t *testing.T) {
14+
suite := godog.TestSuite{
15+
ScenarioInitializer: InitializeScenario,
16+
// TestSuiteInitializer: IntializeTestSuite,
17+
Options: &godog.Options{
18+
Format: "pretty",
19+
Paths: []string{"features/values.feature"},
20+
TestingT: t, // Testing instance that will run subtests.
21+
},
22+
}
23+
24+
if suite.Run() != 0 {
25+
t.Fatal("non-zero status returned, failed to run feature tests")
26+
}
27+
}
28+
29+
type valuesScenarioContainer struct {
30+
ProjectCommand *cobra.Command
31+
TmpltrConfigPathFlag string
32+
SourcesConfigPathFlag string
33+
ValuesPathFlag string
34+
OutputPathFlag string
35+
OutputPath string
36+
CommandArgs []string
37+
OutPutWriter io.Writer
38+
Context *godog.ScenarioContext
39+
}

0 commit comments

Comments
 (0)