Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: add functional tests #49

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

Merged
juanpicado merged 2 commits into master from chore/add-functional-tests
Nov 15, 2018
Merged

Conversation

@dlouzan
Copy link
Collaborator

@dlouzan dlouzan commented Aug 22, 2018
edited
Loading

  • mimic functional testing from upstream verdaccio
  • add code build to travis ci

Fixes #40

- mimic functional testing from upstream verdaccio
- add code build to travis ci
Copy link
Collaborator Author

dlouzan commented Aug 23, 2018

@juanpicado It would be great if you could take a look. It's basically the same approach as verdaccio does itself for unit + functional tests. We adapted some things, like for example for functional tests we start a small express process that mocks the required gitlab calls.

We haven't implemented e2e at the moment, though I think we would take a different approach than verdaccio in that case: use docker compose to launch both verdaccio and gitlab, plus a third image that actually performed the e2e tests against the started environment.

Maybe we can also use this exercise for searching a common approach to support testing for plugins directly from verdaccio. This adds copies of support code that already exists in verdaccio, but at the moment that code is an internal implementation detail from verdaccio, not directly importable.

juanpicado reacted with thumbs up emoji

Copy link
Owner

@bufferoverflow bufferoverflow 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! I like to wait for @juanpicado point of view on this. Anyway, a verdaccio-plugins repo with shared infra and some plugins like this could make sense.

// @flow

import { CREDENTIALS, WRONG_CREDENTIALS } from '../config.functional';
import {HTTP_STATUS} from "../../lib/constants";
Copy link
Collaborator

@ercanucan ercanucan Aug 23, 2018

Choose a reason for hiding this comment

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

minor: style

import whoAmI from './whoami';
import ping from './ping';


Copy link
Collaborator

@ercanucan ercanucan Aug 23, 2018

Choose a reason for hiding this comment

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

minor: consistent white-space usage

@@ -0,0 +1,5 @@
// const chalk = require('chalk');
module.exports = async () => {
// console.log(chalk.green('Teardown Verdaccio Functional'));
Copy link
Collaborator

@ercanucan ercanucan Aug 23, 2018

Choose a reason for hiding this comment

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

why commented out code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because I'm really lazy, I will correct it

Copy link
Collaborator

@dlouzan looks good to me. only minor comments.

Copy link
Collaborator

@dlouzan I'll take a look, just give me some days.

- fix publish test expectations
- small style corrections
Copy link
Collaborator

Maybe we can also use this exercise for searching a common approach to support testing for plugins directly from verdaccio. This adds copies of support code that already exists in verdaccio, but at the moment that code is an internal implementation detail from verdaccio, not directly importable.

@dlouzan one of my objectives was exactly externalizing functional internal implementation for other usages. It's in my queue of tasks.

Currently, we are working on lerna approach that will allow us to create more packages with no pain and my next step is put all this logic out of the box, I'm sure we will find a common approach here.

Copy link
Collaborator Author

dlouzan commented Nov 14, 2018

Are we going to merge this or should I close it?

Copy link
Collaborator

@dlouzan @bufferoverflow it's ok for you guys?


export const TOKEN_BASIC = 'Basic';

export const HEADERS = {
Copy link
Collaborator

@juanpicado juanpicado Nov 15, 2018

Choose a reason for hiding this comment

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

We are working on the core https://github.com/verdaccio/core/tree/master/packages multi package project to bring all these things to specific modules, soon this C&P won't be need it.

dlouzan reacted with thumbs up emoji
Copy link
Collaborator

@dlouzan I tested them, fine for me. 👍

Copy link
Collaborator

@juanpicado juanpicado left a comment

Choose a reason for hiding this comment

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

👍

@juanpicado juanpicado merged commit 17b764c into master Nov 15, 2018
@dlouzan dlouzan deleted the chore/add-functional-tests branch November 15, 2018 11:30
Copy link
Owner

Thank you guys! Awesome!

juanpicado reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ercanucan ercanucan ercanucan left review comments

@bufferoverflow bufferoverflow bufferoverflow approved these changes

@juanpicado juanpicado juanpicado approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /