Skip to content

Commit

Permalink
fix(api): allow description in application import and cli (#6344)
Browse files Browse the repository at this point in the history
* fix(api): allow description in application import and cli

* fix: remove description from cli
  • Loading branch information
sguiheux committed Oct 21, 2022
1 parent 0bc7a67 commit d8168ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions engine/api/application/application_parser.go
Expand Up @@ -66,6 +66,7 @@ func ParseAndImport(ctx context.Context, db gorpmapper.SqlExecutorWithTx, cache
//Craft the application
app := new(sdk.Application)
app.Name = eapp.Name
app.Description = eapp.Description
app.VCSServer = eapp.VCSServer
app.RepositoryFullname = eapp.RepositoryName
app.FromRepository = opts.FromRepository
Expand Down
6 changes: 4 additions & 2 deletions engine/api/application_import_test.go
Expand Up @@ -37,6 +37,7 @@ func Test_postApplicationImportHandler_NewAppFromYAMLWithoutSecret(t *testing.T)

body := `version: v1.0
name: myNewApp
description: myDescription
variables:
var1:
value: value 1
Expand All @@ -63,8 +64,9 @@ variables:
app, err := application.LoadByName(context.TODO(), db, proj.Key, "myNewApp", application.LoadOptions.WithVariables)
require.NoError(t, err)

assert.NotNil(t, app)
assert.Equal(t, "myNewApp", app.Name)
require.NotNil(t, app)
require.Equal(t, "myNewApp", app.Name)
require.Equal(t, "myDescription", app.Description)

//Check variables
for _, v := range app.Variables {
Expand Down

0 comments on commit d8168ff

Please sign in to comment.