-
Notifications
You must be signed in to change notification settings - Fork 129
[BE-1876] Integrate nixpkgs plugin #1156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+596
−171
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
081f066
[BE-1876] Integrate nixpkgs plugin
marcell-vida eb05dd2
Check for version in index, remove plugin version pinning, fixes
marcell-vida 1dfba3d
*
marcell-vida 3738f29
Fix test version
marcell-vida ebe94d2
Rename tool
marcell-vida fce56eb
Remove index checking, use listing
marcell-vida d4c3efd
*
marcell-vida c177efe
Timeout on test
marcell-vida 9aaccad
Simplify things
ofalvai 95548fe
Get rid of MiseExecutor, make ExecEnv mockable instead
ofalvai adc95ec
Change plugin ID to final value
ofalvai 24fd4b5
Unit tests
ofalvai aca4ce3
Add force flag for integration testing
ofalvai a2d8363
Integration tests
ofalvai 972e50b
Add check before executing nix commands
ofalvai 59c8133
Make feature flag value true instead of 1
ofalvai 7e4bff6
AI reviewer fixes
marcell-vida 945d3a3
Merge branch 'master' into BE-1876-integrate-nixpkgs-plugin
marcell-vida 7d750f5
chore: trigger CI checks
marcell-vida d6e6b20
Raise timeout, install backend even with force install
marcell-vida 67f994c
Lint
marcell-vida 6f8f212
Fix tests, update plugin
marcell-vida 488b138
Decrease validate timeout
marcell-vida 45d52d4
Fix tests
marcell-vida dec4eb0
*
marcell-vida 28bb814
Tests working on stable stacks too, consistent commenting
marcell-vida 68e3e49
Remove nix availability check
marcell-vida e9574f3
Fake nix checking in tests instead of env var override
ofalvai ba0feab
Merge branch 'master' into BE-1876-integrate-nixpkgs-plugin
marcell-vida 3138f4d
Fixes
marcell-vida 77690fa
Comments
ofalvai de3808a
*
marcell-vida 2c1987b
Merge branch 'master' into BE-1876-integrate-nixpkgs-plugin
ofalvai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ func TestMiseVersionString(t *testing.T) { | |
| tests := []struct { | ||
| name string | ||
| tool provider.ToolRequest | ||
| backend string | ||
| want string | ||
| wantErr bool | ||
| }{ | ||
|
|
@@ -23,6 +24,7 @@ func TestMiseVersionString(t *testing.T) { | |
| UnparsedVersion: "18.20.0", | ||
| ResolutionStrategy: provider.ResolutionStrategyStrict, | ||
| }, | ||
| backend: "", | ||
| want: "[email protected]", | ||
| wantErr: false, | ||
| }, | ||
|
|
@@ -33,6 +35,7 @@ func TestMiseVersionString(t *testing.T) { | |
| UnparsedVersion: "3.11", | ||
| ResolutionStrategy: provider.ResolutionStrategyLatestReleased, | ||
| }, | ||
| backend: "", | ||
| want: "python@prefix:3.11", | ||
| wantErr: false, | ||
| }, | ||
|
|
@@ -43,6 +46,7 @@ func TestMiseVersionString(t *testing.T) { | |
| UnparsedVersion: "1.21", | ||
| ResolutionStrategy: provider.ResolutionStrategyLatestInstalled, | ||
| }, | ||
| backend: "", | ||
| want: "[email protected]", | ||
| wantErr: false, | ||
| }, | ||
|
|
@@ -53,6 +57,7 @@ func TestMiseVersionString(t *testing.T) { | |
| UnparsedVersion: "17", | ||
| ResolutionStrategy: provider.ResolutionStrategyLatestInstalled, | ||
| }, | ||
| backend: "", | ||
| want: "java@prefix:17", | ||
| wantErr: false, | ||
| }, | ||
|
|
@@ -63,6 +68,7 @@ func TestMiseVersionString(t *testing.T) { | |
| UnparsedVersion: "3.0", | ||
| ResolutionStrategy: provider.ResolutionStrategyLatestInstalled, | ||
| }, | ||
| backend: "", | ||
| want: "", | ||
| wantErr: true, | ||
| }, | ||
|
|
@@ -73,9 +79,32 @@ func TestMiseVersionString(t *testing.T) { | |
| UnparsedVersion: "18.0.0", | ||
| ResolutionStrategy: provider.ResolutionStrategy(999), | ||
| }, | ||
| backend: "", | ||
| want: "", | ||
| wantErr: true, | ||
| }, | ||
| { | ||
| name: "strict resolution with nixpkgs backend", | ||
| tool: provider.ToolRequest{ | ||
| ToolName: "ruby", | ||
| UnparsedVersion: "3.3.0", | ||
| ResolutionStrategy: provider.ResolutionStrategyStrict, | ||
| }, | ||
| backend: "nixpkgs", | ||
| want: "nixpkgs:[email protected]", | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "latest released with nixpkgs backend", | ||
| tool: provider.ToolRequest{ | ||
| ToolName: "ruby", | ||
| UnparsedVersion: "3.3", | ||
| ResolutionStrategy: provider.ResolutionStrategyLatestReleased, | ||
| }, | ||
| backend: "nixpkgs", | ||
| want: "nixpkgs:ruby@prefix:3.3", | ||
| wantErr: false, | ||
| }, | ||
| } | ||
|
|
||
| for _, tt := range tests { | ||
|
|
@@ -96,7 +125,7 @@ func TestMiseVersionString(t *testing.T) { | |
| return "", fmt.Errorf("no fake behavior defined for tool %s", toolName) | ||
| } | ||
|
|
||
| got, err := miseVersionString(tt.tool, latestInstalledResolver) | ||
| got, err := miseVersionString(tt.tool, latestInstalledResolver, tt.backend) | ||
|
|
||
| if tt.wantErr { | ||
| require.Error(t, err) | ||
|
|
||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.