<commit_before>package mozillaEvaluationWorker

import (
	"encoding/json"
	"testing"

	"github.com/mozilla/tls-observatory/certificate"
	"github.com/mozilla/tls-observatory/connection"
)

type testParams struct {
	expectedLevel    string
	expectedFailures []string
	cipherscan       string
	certificate      string
}

func TestLevels(t *testing.T) {
	var tps = []testParams{<commit_msg>Fix test initialization in evaluation worker<commit_after>package mozillaEvaluationWorker

import (
	"encoding/json"
	"os"
	"testing"

	"github.com/mozilla/tls-observatory/certificate"
	"github.com/mozilla/tls-observatory/connection"
)

type testParams struct {
	expectedLevel    string
	expectedFailures []string
	cipherscan       string
	certificate      string
}

func TestMain(m *testing.M) {
	err := json.Unmarshal([]byte(ServerSideTLSConfiguration), &sstls)
	if err != nil {
		log.Fatal("Could not load Server Side TLS configuration. Evaluation Worker not available")
	}
	modern = sstls.Configurations["modern"]
	intermediate = sstls.Configurations["intermediate"]
	old = sstls.Configurations["old"]

	r := m.Run()
	os.Exit(r)
}

func TestLevels(t *testing.T) {
	var tps = []testParams{
{'fraction_non_alphanumeric': 0.10950764006791172, 'fraction_numerical': 0.0, 'mean_word_length': 4.779411764705882, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6742766', 'n_tokens_mistral': 401, 'n_tokens_neox': 376, 'n_words': 82}