Skip to content
This repository was archived by the owner on Feb 28, 2020. It is now read-only.

fix: Failing generator-swiftserver integration tests for SDKGen service #412

Merged
merged 10 commits into from
Jan 10, 2018

Conversation

sandmman
Copy link
Contributor

@sandmman sandmman commented Jan 4, 2018

Fix for #544

Changes

  • Handle Swift tools 4.0 package manifest format in server SDK zip file downloaded from SDKgen service
  • Remove ObjectMapper from the module dependencies (it was hard-coded in the target dependencies)
  • Update the mocked response content for server SDK tests to match the live service

Note In the readPackageDependencies method, we had a test to verify the package url from the sdkgen service matched our expectations (i.e. there was a minor version). Since we already had this logic, I added a similar regex expression. It is not strictly necessary, so we could remove it and its associated test case.

The regex looks for properly formatted package urls using the .upToNextMajor, .upToNextMinor, from: syntax ( does not support .branch). It also requires properly formatted version strings of a standard x.x.x format.

Exit Criteria

  • generator-swiftserver unit and integration tests pass (npm run coverage)
  • generator-swiftserver SDKgen compatibility test is working again (npm run testsdkgen)

@sandmman sandmman changed the title Addresses failing generator-swiftserver integration tests for SDKGen service fix: Addresses failing generator-swiftserver integration tests for SDKGen service Jan 4, 2018
@sandmman sandmman changed the title fix: Addresses failing generator-swiftserver integration tests for SDKGen service fix: Failing generator-swiftserver integration tests for SDKGen service Jan 4, 2018
@codecov-io
Copy link

codecov-io commented Jan 4, 2018

Codecov Report

Merging #412 into develop will increase coverage by 0.64%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #412      +/-   ##
===========================================
+ Coverage    89.96%   90.61%   +0.64%     
===========================================
  Files            9        9              
  Lines         1286     1278       -8     
===========================================
+ Hits          1157     1158       +1     
+ Misses         129      120       -9
Impacted Files Coverage Δ
lib/sdkGenHelper.js 92.1% <100%> (+9.96%) ⬆️

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 f3b8cdb...1c4fbce. Read the comment docs.

Copy link
Contributor

@tunniclm tunniclm left a comment

Choose a reason for hiding this comment

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

Just checked the package-lock.json and it contains invalid merge marks (I think!)

The file should be re-generated to fix.

Copy link
Contributor

@tunniclm tunniclm 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, thanks

@tunniclm tunniclm merged commit 12269ca into IBM-Swift:develop Jan 10, 2018
@tunniclm tunniclm added this to the 4.3.0 milestone Jan 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants