-
Notifications
You must be signed in to change notification settings - Fork 24
feat(bolt-install): set manifest source to remote for non-rosi projects #96
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
Changes from all commits
4738fab
9c5a18f
cd3be6c
4dea157
ca4184e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,6 +113,7 @@ func TestCreateGitArgs(t *testing.T) { | |
| func Test_Create_installProjectDependencies(t *testing.T) { | ||
| tests := map[string]struct { | ||
| experiments []string | ||
| runtime string | ||
| manifestSource config.ManifestSource | ||
| existingFiles map[string]string | ||
| expectedOutputs []string | ||
|
|
@@ -208,6 +209,19 @@ func Test_Create_installProjectDependencies(t *testing.T) { | |
| `Updated config.json manifest source to "app settings" (remote)`, | ||
| }, | ||
| }, | ||
| "When bolt + bolt-install experiment and Deno project, should set manifest source to project (local)": { | ||
| experiments: []string{"bolt", "bolt-install"}, | ||
| expectedOutputs: []string{ | ||
| `Updated config.json manifest source to "project" (local)`, | ||
| }, | ||
| }, | ||
| "When bolt + bolt-install experiment and non-Deno project, should set manifest source to app settings (remote)": { | ||
| experiments: []string{"bolt", "bolt-install"}, | ||
| runtime: "node", | ||
| expectedOutputs: []string{ | ||
| `Updated config.json manifest source to "app settings" (remote)`, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! It's so nice to make this output explicit to avoid unexpected UI changes in perhaps later iteration 👾
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, I agree. I remember when you suggested adding it and it's helping to catch changes. 🪤 |
||
| }, | ||
| }, | ||
| } | ||
| for name, tt := range tests { | ||
| t.Run(name, func(t *testing.T) { | ||
|
|
@@ -226,6 +240,7 @@ func Test_Create_installProjectDependencies(t *testing.T) { | |
| ctx := slackcontext.MockContext(t.Context()) | ||
| clientsMock := shared.NewClientsMock() | ||
| clientsMock.Os.On("Getwd").Return(projectDirPath, nil) | ||
| clientsMock.HookExecutor.On("Execute", mock.Anything, mock.Anything).Return(`{}`, nil) | ||
| clientsMock.AddDefaultMocks() | ||
|
|
||
| // Set experiment flag | ||
|
|
@@ -237,6 +252,9 @@ func Test_Create_installProjectDependencies(t *testing.T) { | |
|
|
||
| // Set runtime to be Deno (or node or whatever) | ||
| clients.SDKConfig.Runtime = "deno" | ||
| if tt.runtime != "" { | ||
| clients.SDKConfig.Runtime = tt.runtime | ||
| } | ||
|
|
||
| // Create project directory | ||
| if err := clients.Fs.MkdirAll(filepath.Dir(projectDirPath), 0755); err != nil { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔗 ✨