Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rujhan-arora-astronomer committed Dec 17, 2024
1 parent cbbf289 commit dc52834
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/software/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ func (s *Suite) TestDeploy() {
err = execDeployCmd([]string{"test-deployment-id", "--force"}...)
s.NoError(err)

// Restore DagsOnlyDeploy to default behavior
DagsOnlyDeploy = deploy.DagsOnlyDeploy

s.Run("error should be returned for astro deploy, if DeployAirflowImage throws error", func() {
DeployAirflowImage = func(houstonClient houston.ClientInterface, path, deploymentID, wsID, byoRegistryDomain string, ignoreCacheDeploy, byoRegistryEnabled, prompt bool, description string, isImageOnlyDeploy bool, imageName string) (string, error) {
return deploymentID, deploy.ErrNoWorkspaceID
Expand Down
5 changes: 5 additions & 0 deletions cmd/software/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ func (s *Suite) SetupSuite() {
func (s *Suite) SetupTest() {
// Reset the version once this is torn down
houstonVersion = "0.34.0"
DagsOnlyDeploy = deploy.DagsOnlyDeploy
}

func (s *Suite) SetupSubTest() {
DagsOnlyDeploy = deploy.DagsOnlyDeploy
}

func (s *Suite) TearDownSuite() {
Expand Down

0 comments on commit dc52834

Please sign in to comment.