Skip to content

Commit

Permalink
feat: add getter for krmt build directory (#1106)
Browse files Browse the repository at this point in the history
* feat:adds a getter for build directory for the blueprint test

* Update infra/blueprint-test/pkg/krmt/krm.go

Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>

* moving GetBuildDir with other methods

* Update infra/blueprint-test/pkg/krmt/krm.go

Co-authored-by: Awais Malik <awmalik@google.com>
Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
  • Loading branch information
3 people committed Mar 24, 2022
1 parent e27e4d5 commit fd68a6b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions infra/blueprint-test/pkg/krmt/krm.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,3 +352,12 @@ func (b *KRMBlueprintTest) Test() {
utils.RunStage("apply", func() { b.Apply(a) })
utils.RunStage("verify", func() { b.Verify(a) })
}

// GetBuildDir returns the temporary build dir created for hydrating config. Defaults to .build/test-name.
func (b *KRMBlueprintTest) GetBuildDir() string {
if b.buildDir == "" {
b.t.Fatalf("unable to get a valid build directory")
}

return b.buildDir
}

0 comments on commit fd68a6b

Please sign in to comment.