Skip to content
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

e2e test of pkg.json update for local path fails on AppVeyor CI #787

Closed
3 tasks done
brodybits opened this issue Jun 13, 2019 · 3 comments
Closed
3 tasks done

e2e test of pkg.json update for local path fails on AppVeyor CI #787

brodybits opened this issue Jun 13, 2019 · 3 comments
Assignees
Labels

Comments

@brodybits
Copy link
Contributor

Bug Report

Problem

The end-to-end test of pkg.json update for local path fails on AppVeyor CI on Node.js version 10. The failing test is in the following function:

// Test#025: has a pkg.json. Checks if local path is added to pkg.json for platform and plugin add.
it('Test#025 : if you add a platform/plugin with local path, pkg.json gets updated', function () {
const PLATFORM = 'browser';
const PLUGIN = 'cordova-lib-test-plugin';
const platformPath = copyFixture(`platforms/cordova-${PLATFORM}`);
const pluginPath = copyFixture(path.join('plugins', PLUGIN));
return cordova.platform('add', platformPath, { save: true })
.then(function () {
// Pkg.json has platform
expect(getPkgJson('cordova.platforms')).toEqual([PLATFORM]);
expect(getPkgJson(`dependencies.cordova-${PLATFORM}`)).toBeDefined();
}).then(function () {
// Run cordova plugin add local path --save --fetch.
return cordova.plugin('add', pluginPath, { save: true });
}).then(function () {
// Pkg.json has test plugin.
expect(getPkgJson(`cordova.plugins.${PLUGIN}`)).toBeDefined();
expect(getPkgJson(`dependencies.${PLUGIN}`)).toBeDefined();
});
});
});

The proposed workaround in PR #786 is to skip this test on Windows.

The correct solution is to investigate why this test fails on AppVeyor CI on Node.js 10 and resolve the underlying cause.

I am raising this issue as asked by @janpio in #786 (comment).

What is expected to happen?

This end-to-end test succeeds on AppVeyor CI on all supported Node.js versions.

What does actually happen?

This end-to-end test fails on AppVeyor CI on Node.js version 10.

Information

In https://github.com/apache/cordova-lib/commits/master we can see that the build failed on 268688a - the failure is on AppVeyor CI on Node.js version 10.

This build failure appeared when I raised and then merged PR #783. Unfortunately I did not see the failure before merging that PR.

I tried raising PR #785 to revert PR #783, but reverting PR #783 does not seem to resolve this test failure.

Command or Code

See appveyor.yml: the following command seems to reproduce this failure on AppVeyor CI: npm test

Environment, Platform, Device

Windows server on AppVeyor CI

Version information

See package.json:

  • cordova-common@3
  • cordova-create@2
  • cordova-fetch@2
  • cordova-serve@2

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@brodybits brodybits added the bug label Jun 13, 2019
@brodybits
Copy link
Contributor Author

While filling in the information requested by the issue template, I realized that cordova-lib is still using fs-extra@7. I wonder if using fs-extra@latest (fs-extra@8) may resolve this test failure?

I will try with fs-extra@8 after we publish cordova-common@3.2.0, also with fs-extra@8 update, in 12-18 hours.

@brodybits
Copy link
Contributor Author

Bad news: fs-extra@8 update does not seem to resolve the issue on Node.js 10: https://ci.appveyor.com/project/brodybits/cordova-lib/builds/25272793/job/srv776acvnxsxvrb

for cordova-common@3-nightly and fs-extra@8 updates: master...brodybits:fs-extra-8-nightly-wip

I think we need the test workaround that I proposed in PR #786. I remain very hopeful that we can resolve this AppVeyor CI issue, someday.

@raphinesse
Copy link
Contributor

raphinesse commented Nov 21, 2019

This had been resolved by #770

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants