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

Please document how to use TestDriver wtih TimeSeries etc. #12012

Open
jhancock4d opened this issue Apr 20, 2021 · 3 comments
Open

Please document how to use TestDriver wtih TimeSeries etc. #12012

jhancock4d opened this issue Apr 20, 2021 · 3 comments

Comments

@jhancock4d
Copy link

As soon as we added time series and counters to our database, we now get a license throw on TestDriver because it by default doesn't allow it so all of our unit tests are broken.

Presumably there is a way to use test driver and inject our developer licence file into it, but I couldn't find any documentation on how to do so.

It would be nice of the test driver docs showed this so that unit tests can be done on time series etc.

Thanks!

@ppekrol
Copy link
Member

ppekrol commented Apr 20, 2021

Hi @jhancock4d

I've created an issue for that: https://issues.hibernatingrhinos.com/issue/RDoc-1921

Meanwhile you can set RAVEN_LICENSE env variable or use ConfigureServer (https://ravendb.net/docs/article-page/5.1/csharp/start/test-driver#configureserver) and pass a license via commandLineArgs.

Hope it helps

@jhancock4d
Copy link
Author

Thanks! Could you give an example of using the command line args? I found one person mentioning trying that but they couldn't get it to work.

@ppekrol
Copy link
Member

ppekrol commented Apr 20, 2021

Sure thing:

    public abstract class TestsBase : RavenTestDriver
    {
        static TestsBase()
        {
            ConfigureServer(new TestServerOptions
            {
                CommandLineArgs = new List<string>
                {
                    "--License.Path=C:\\temp\\license.json"
                }
            });
        }
    }

    public class MyTests : TestsBase
    {
        [Fact]
        public void MyTest1()
        {
            using (var store = GetDocumentStore())
            {
                WaitForUserToContinueTheTest(store);
            }
        }
    }

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

No branches or pull requests

2 participants