mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Adding API tests that verifies recently changed code bevaviour
This commit is contained in:
@@ -223,11 +223,13 @@ func (ds *sqlStore) UpdateApp(ctx context.Context, newapp *models.App) (*models.
|
||||
func (ds *sqlStore) RemoveApp(ctx context.Context, appName string) error {
|
||||
return ds.Tx(func(tx *sqlx.Tx) error {
|
||||
res, err := tx.ExecContext(ctx, tx.Rebind(`DELETE FROM apps WHERE name=?`), appName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
n, err := res.RowsAffected()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if n == 0 {
|
||||
return models.ErrAppsNotFound
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user