Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Relative import breaks for 'non-main branchs' (#1364)
## Description: Relative import breaks for 'non-main branchs' ## Is this change user-facing? NO ## References (if applicable): fix #1361
- Loading branch information
Showing
8 changed files
with
96 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 23 additions & 15 deletions
38
...api_container/server/startosis_engine/startosis_packages/mock_package_content_provider.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
.../golang/testsuite/startosis_package_test/startosis_remote_package_relative_import_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package startosis_package_test | ||
|
||
import ( | ||
"context" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
const ( | ||
noMainBranchWithRelativeImportRemotePackage = "github.com/kurtosis-tech/sample-startosis-load@test-branch" | ||
) | ||
|
||
func (suite *StartosisPackageTestSuite) TestStartosisNoMainBranchRemotePackage_RelativeImports() { | ||
ctx := context.Background() | ||
runResult, _ := suite.RunRemotePackage(ctx, noMainBranchWithRelativeImportRemotePackage) | ||
|
||
t := suite.T() | ||
require.Nil(t, runResult.InterpretationError) | ||
require.Empty(t, runResult.ValidationErrors) | ||
require.Nil(t, runResult.ExecutionError) | ||
|
||
expectedResult := "Package loaded.\n" | ||
require.Regexp(t, expectedResult, string(runResult.RunOutput)) | ||
} |