Skip to content

Reenable some helix tests #7763

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
merged 55 commits into from
Feb 26, 2019
Merged

Reenable some helix tests #7763

merged 55 commits into from
Feb 26, 2019

Conversation

HaoK
Copy link
Member

@HaoK HaoK commented Feb 20, 2019

Publishes the src files the tests is using so they get included as part of the helix payload

@ajcvickers @natemcmaster

@HaoK HaoK requested a review from ajcvickers February 20, 2019 21:29
@Eilon Eilon added the area-identity Includes: Identity and providers label Feb 20, 2019
@HaoK HaoK requested a review from dougbu as a code owner February 21, 2019 03:42
Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

LGTM but please get Helix passing before you submit

@HaoK
Copy link
Member Author

HaoK commented Feb 21, 2019

I think the dotnet runtime version upgrade (not part of this PR) might be causing some of the failures (it def exposed the issue with the env vars being setup wrong in the runtests.cmd)

@HaoK
Copy link
Member Author

HaoK commented Feb 21, 2019

@dougbu can you take a quick look at a similar fix applied to the mvc analyzer test projects?

@HaoK HaoK changed the title Fix identity UI script tests on helix Reenable helix tests (Identity UI / MVC(Api) Analyzers Feb 21, 2019
@dougbu
Copy link
Contributor

dougbu commented Feb 22, 2019

@dougbu can you take a quick look at a similar fix applied to the mvc analyzer test projects?

Are you asking for a review of a PR? If so, yes. If you need something else, I don't have much time at the moment.

@HaoK
Copy link
Member Author

HaoK commented Feb 22, 2019

Yes just rereview the PR, I added some changes to the MVC api test projects similar to the identity UI project, its just an additional publish + helix branch around where to find the test files

Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

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

Still looks good to me though CI builds and tests disagree.

@HaoK
Copy link
Member Author

HaoK commented Feb 22, 2019

@pakrym looks like the logging test errors are consistent on these tests now, I guess I will skip them for now, if you wanted to take a look at the logged tests that are failing with Null Ref, its these:

https://mc.dot.net/#/user/aspnetcore/pr~2Faspnet~2Faspnetcore/ci/20190221.68

@HaoK HaoK mentioned this pull request Feb 22, 2019
@HaoK HaoK changed the title Reenable helix tests (Identity UI / MVC(Api) Analyzers Reenable some helix tests and skip failing logged tests Feb 22, 2019
@HaoK
Copy link
Member Author

HaoK commented Feb 23, 2019

@pakrym finally things are looking good again with your logging fix, I put it in Directory.Build.targets for now since I don't have the rest of your refactoring in this PR.

This is the best run I've seen in a while (passing ci and windows tests are all green in helix-test) so I'm thinking this is a candidate for squash/merge

@@ -148,13 +146,17 @@ private static List<ScriptTag> GetScriptTags(string cshtmlFile)
private static string GetSolutionDir()
{
var dir = new DirectoryInfo(AppContext.BaseDirectory);
while (dir != null)
// On helix we use the published copy
if (!string.Equals(Environment.GetEnvironmentVariable("helix"), "true", StringComparison.OrdinalIgnoreCase))
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather prefer we had a shared way of doing this (looking for the test base directory). Rather then copying the snippet around.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean add a test helper method for this that both the helix skip attribute and actual tests can use to check if we are running on helix?

Copy link
Contributor

Choose a reason for hiding this comment

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

Add a way to find the test asset root. Or at minimum to detect running in helix.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't feel comfortable generalizing a single test, I can add the helix detection now since the HelixSkip has the same logic. Once I fix a few more tests and see a clear pattern we can look into a generalized shared GetSolutionDir.

Copy link
Member Author

Choose a reason for hiding this comment

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

@pakrym added a static helper method for now which encapsulates the Environment helix check

Copy link
Contributor

@pakrym pakrym left a comment

Choose a reason for hiding this comment

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

Pending nits.

@HaoK HaoK changed the title Reenable some helix tests and skip failing logged tests Reenable some helix tests Feb 26, 2019
@HaoK HaoK merged commit a2c8a34 into master Feb 26, 2019
@HaoK HaoK deleted the haok/helix-uifix branch March 12, 2019 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-identity Includes: Identity and providers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants