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

Run functional tests against Scalar-in-C #505

Merged
merged 24 commits into from
Jun 16, 2021

Conversation

derrickstolee
Copy link
Contributor

@derrickstolee derrickstolee commented Apr 23, 2021

The latest vfs-2.32.0 branch in microsoft/git includes the Scalar CLI, so start testing that version of Scalar instead of the .NET version from this repo.

derrickstolee and others added 4 commits June 7, 2021 10:13
The prefetch refs moved in Git v2.32.0 in response to interactions with
custom refspecs. This re-inserted the word "remotes" into the refspec
used to fetch the prefetch refs.

Signed-off-by: Derrick Stolee <[email protected]>
As is frequently the case with upstream reviews, extensive changes are
necessary, and one such change was to move FSMonitor from command modes
(à la `--start`, `--stop`) to subcommands (`start`, `stop`, without the
double-dash).

Therefore we must adjust downstream projects such as Scalar's Functional
Test suite accordingly.

Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
We expect microsoft/git to be installed on the PATH, so use that as our
source for Scalar, not the recent build of the .NET project.
Signed-off-by: Derrick Stolee <[email protected]>
@dscho dscho force-pushed the test-scalar-in-c branch from 74b0086 to a146656 Compare June 9, 2021 19:44
@dscho
Copy link
Member

dscho commented Jun 9, 2021

@derrickstolee FYI I rebased this onto vfs-2.32.0 (because I have a hunch that the fsmonitor--daemon --stop vs fsmonitor--daemon stop issue might be responsible for the remaining flakiness of the Functional Tests).

I also used the opportunity to reorder and squash and drop some commits. Most notably, there were some extra files in ade3040 (e.g. a full Git for Windows installer); Would you mind verifying that I did not mess up when I turned it into 39ef264?

@@ -36,14 +36,15 @@

<!-- Version information -->
<ScalarVersion>0.2.173.2</ScalarVersion>
<MinimumGitVersion>v2.25.0.vfs.1.1</MinimumGitVersion>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see we are adding this even though it is present further down. Something to clean up when we actually merge this.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm. Let me try to remove it.

Comment on lines 17 to 20
public static string GetInternalParameter()
{
return $"\"{{\\\"ServiceName\\\":\\\"{ScalarServiceProcess.TestServiceName}\\\"," +
"\\\"StartedByService\\\":false}\"";
return "\"{}\"";
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should be able to delete this entirely.

Copy link
Member

Choose a reason for hiding this comment

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

Let's try that.

derrickstolee and others added 14 commits June 9, 2021 22:53
Remove tests that check behavior that is unnecessary now:

1. Clones can happen anywhere. The virtualization is gone, so we don't
   need to worry about collisions this way. Allow users to create
   confusing setups.

2. We should not be locked to the strange output from previous
   Scalar commands. Specifically, the cache server output doesn't
   need to be so specific. We know from the Git tests that setting
   the cache server works.

Signed-off-by: Derrick Stolee <[email protected]>
These tests are unnecessary now because we rely upon the Git commands
themselves. The C port of Git has dropped the --batch-size parameter,
and that is fine. It only existed for testing purposes, anyway.
This relies on a brittle output check. We have better tests for this
in the Git codebase.
We have control over this in the Git maintenance steps. No need to check
these tests.
This functionality is mostly replaced by 'git maintenance run' and we
have Git tests that check 'scalar run' now.
These have different behavior now that we use the Git norms. Instead
rely on the Git tests.
The C version of Scalar reports the paths with a forward slash as
directory separator, even on Windows.

Signed-off-by: Johannes Schindelin <[email protected]>
The way Git creates alternate files can include a trailing newline, when
the .NET implementation of Scalar did not.
This fits Git's die() error code.

Signed-off-by: Derrick Stolee <[email protected]>
This flag is not implemented in the C version of Scalar because there is
no Scalar service anymore: all of the scheduled tasks are handled by
`git maintenance` instead.
The `vsts/info` endpoint always requires authentication. In the .NET
version, this is handled by Scalar directly, but in the C version,
authentication is handled by the `gvfs-helper`.

Since this only really matters in CI (interactive usage of Scalar with
Azure Repos will ask the user to authenticate, but that's handled
conveniently by the credential helper), we added support to skip that
endpoint via the environment variable `SCALAR_TEST_SKIP_VSTS_INFO`.

Signed-off-by: Johannes Schindelin <[email protected]>
derrickstolee added a commit to microsoft/git that referenced this pull request Aug 3, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
derrickstolee added a commit to microsoft/git that referenced this pull request Aug 3, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee added a commit to microsoft/git that referenced this pull request Aug 3, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
derrickstolee added a commit to microsoft/git that referenced this pull request Aug 5, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee added a commit to microsoft/git that referenced this pull request Aug 5, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
dscho pushed a commit to microsoft/git that referenced this pull request Aug 5, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit to microsoft/git that referenced this pull request Aug 5, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
derrickstolee added a commit to microsoft/git that referenced this pull request Aug 9, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee added a commit to microsoft/git that referenced this pull request Aug 9, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
derrickstolee added a commit to microsoft/git that referenced this pull request Aug 12, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee added a commit to microsoft/git that referenced this pull request Aug 12, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
derrickstolee added a commit to microsoft/git that referenced this pull request Aug 17, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee added a commit to microsoft/git that referenced this pull request Aug 17, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
dscho pushed a commit to dscho/git that referenced this pull request Aug 24, 2021
… tests

We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
dscho pushed a commit to dscho/git that referenced this pull request Aug 30, 2021
… tests

We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
dscho pushed a commit to dscho/git that referenced this pull request Sep 3, 2021
… tests

We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
dscho pushed a commit to dscho/git that referenced this pull request Sep 9, 2021
… tests

We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
dscho pushed a commit to dscho/git that referenced this pull request Sep 13, 2021
… tests

We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
dscho pushed a commit to dscho/git that referenced this pull request Oct 7, 2021
… tests

We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
dscho pushed a commit to dscho/git that referenced this pull request Oct 27, 2021
… tests

We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
dscho pushed a commit to microsoft/git that referenced this pull request Oct 30, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.

Signed-off-by: Derrick Stolee <[email protected]>
dscho pushed a commit to microsoft/git that referenced this pull request Oct 30, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
derrickstolee added a commit to microsoft/git that referenced this pull request Oct 30, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee added a commit to microsoft/git that referenced this pull request Oct 30, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
derrickstolee added a commit to microsoft/git that referenced this pull request Oct 31, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee added a commit to microsoft/git that referenced this pull request Oct 31, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
derrickstolee added a commit to microsoft/git that referenced this pull request Nov 4, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee added a commit to microsoft/git that referenced this pull request Nov 4, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
derrickstolee added a commit to microsoft/git that referenced this pull request Nov 10, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.

Signed-off-by: Derrick Stolee <[email protected]>
derrickstolee added a commit to microsoft/git that referenced this pull request Nov 10, 2021
We were using derrickstolee/scalar:test-scalar-in-c as a temporary
branch while we review microsoft/scalar#505 and ensure that it works as
a vehicle for tests in microsoft/git. That work is complete, so let's
update our ref to point to the official repo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants