Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

[APP-257] Add integration tests to check CNAB bundle API #755

Merged
merged 3 commits into from
Nov 27, 2019

Conversation

aiordache
Copy link
Contributor

@aiordache aiordache commented Nov 20, 2019

APP-257

- What I did
Check mandatory fields in the CNAB bundle for v1.

Added E2E test for running an app generated with an old docker app version.

- Description for the changelog
E2E test for backwards compatibility

- A picture of a cute animal (not mandatory)

image

@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "app-257_cnab_api_tests" git@github.com:aiordache/app.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354111120
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

@aiordache aiordache changed the title App 257 cnab api tests Add integration tests to check CNAB bundle API Nov 20, 2019
e2e/helper_test.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 21, 2019

Codecov Report

Merging #755 into master will increase coverage by 0.08%.
The diff coverage is 74.35%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #755      +/-   ##
==========================================
+ Coverage   70.17%   70.26%   +0.08%     
==========================================
  Files          64       64              
  Lines        3568     3598      +30     
==========================================
+ Hits         2504     2528      +24     
- Misses        732      735       +3     
- Partials      332      335       +3
Impacted Files Coverage Δ
internal/commands/image/rm.go 62.5% <71.42%> (+3.87%) ⬆️
internal/store/bundle.go 76.57% <75%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3a9aed...ec4a452. Read the comment docs.

@aiordache aiordache changed the title Add integration tests to check CNAB bundle API [APP-257] Add integration tests to check CNAB bundle API Nov 22, 2019
@aiordache aiordache force-pushed the app-257_cnab_api_tests branch 3 times, most recently from bb5a553 to 92a76c7 Compare November 25, 2019 18:41
@aiordache aiordache force-pushed the app-257_cnab_api_tests branch 2 times, most recently from f08376e to 8d96f98 Compare November 26, 2019 12:47
e2e/compatibility_test.go Outdated Show resolved Hide resolved
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
Copy link
Member

@eunomie eunomie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good as a first version if @silvin-lubecki is ok with the answers to his comments.

)

func loadAndTagImage(info dindSwarmAndRegistryInfo, tmpDir *fs.Dir, tag string, url string) error {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: empty line

assert.NilError(t, os.MkdirAll(bundleDir, os.FileMode(0777)))
assert.NilError(t, ioutil.WriteFile(filepath.Join(bundleDir, "bundle.json"), data, os.FileMode(0644)))

// load images build with an old Docker App version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// load images build with an old Docker App version
// load images built with an old Docker App version

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with @eunomie nits

Signed-off-by: Anca Iordache <anca.iordache@docker.com>
@silvin-lubecki silvin-lubecki merged commit e890e66 into docker:master Nov 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants