From 4bcebaf1b44cf3306a8c82c8eda04d811d3914b7 Mon Sep 17 00:00:00 2001 From: Rohan Yadav Date: Mon, 9 Sep 2019 21:24:10 -0400 Subject: [PATCH] cliccl: Change license acquisition URL Change the cockroach demo license acquisition URLs to point to a new URL. Release note: None --- pkg/ccl/cliccl/demo.go | 8 ++++---- pkg/cli/demo.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/ccl/cliccl/demo.go b/pkg/ccl/cliccl/demo.go index fdf8d23df5c3..1199f50ecbcf 100644 --- a/pkg/ccl/cliccl/demo.go +++ b/pkg/ccl/cliccl/demo.go @@ -22,9 +22,8 @@ import ( "github.com/cockroachdb/errors" ) -// TODO (rohany): change this once another endpoint is setup for getting licenses. -// This URL grants a license that is valid for 1 hour. -const licenseURL = "https://register.cockroachdb.com/api/prodtest" +// This URL grants a license that is valid for 24 hours. +const licenseURL = "https://register.cockroachdb.com/api/license" func getLicense(clusterID uuid.UUID) (string, error) { client := &http.Client{ @@ -36,7 +35,8 @@ func getLicense(clusterID uuid.UUID) (string, error) { } // Send some extra information to the endpoint. q := req.URL.Query() - q.Add("type", "demo") + // Let the endpoint know we are requesting a demo license. + q.Add("kind", "demo") q.Add("version", build.VersionPrefix()) q.Add("clusterid", clusterID.String()) req.URL.RawQuery = q.Encode() diff --git a/pkg/cli/demo.go b/pkg/cli/demo.go index c6eba639ce3e..f99590813056 100644 --- a/pkg/cli/demo.go +++ b/pkg/cli/demo.go @@ -61,7 +61,7 @@ environment variable "COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING". }), } -const demoOrg = "Cockroach Labs - Production Testing" +const demoOrg = "Cockroach Demo" const defaultGeneratorName = "movr"