func GuardProduction(t *testing.T) {
	url := readFromConfig().DbUrl
	if strings.Contains(strings.ToLower(url), "prod") {
		t.Fatalf("You are trying to run this test against what looks like a production database! Current DB URL: %s", url)
	}
}
GuardProduction will cause a test to fail if the URL looks like a production
URL. Use this as the first line in a Test to prevent accidentally saving
library tests results in production DB.
package db
import (
	"bytes"
	"encoding/json"
	"fmt"
	"github.com/mercari/testdeck/service/config"
	"net/http"
	"os"
	"reflect"
	"strconv"
	"strings"
	"testing"
	"time"
	"github.com/pkg/errors"
	"github.com/mercari/testdeck/constants"
)
var HTTPClient *http.Client
const (
	EnvKeyJobName = "JOB_NAME"
	EnvKeyPodName = "POD_NAME"
)
const (
	Job = "job"
	JobUpdate = "jobUpdate"
	Statistic = "statistic"
	Timing = "timing"
	Status = "status"
)
var Endpoints = map[string]string{
	Job:       "/job",
	JobUpdate: "/job/:id",
	Statistic: "/result",
	Timing:    "/timing",
	Status:    "/status",
}
type ServerResponse struct {
	ID     int    `json:"id"`
	Status string `json:"status"`
	Error  string `json:"error"`
}
type Db struct {
	GcpProjectID string
}
func readFromConfig() *config.Env {
	env, err := config.ReadFromEnv()
	if err != nil {
		panic(errors.Wrap(err, "Could not read environment variables!"))
	}
	return env
}