<commit_before>package main

import (
	"testing"
	"os"
)

func Test0ParseCommandLine(t *testing.T) {
	//var c Config
	var err error
	var discoAddress = "http://127.0.0.1:5000"

	os.Setenv("DISCOVERY_ADDRESS", discoAddress)
	CONF, err = CreateConfig()
	if err != nil {
		t.Fail()
	}
	CONF.ProcCmdline = "tests" + CONF.ProcCmdline + "0"
	CONF.ProcBootId = "tests" + CONF.ProcBootId

	bi, err := ParseCommandLine()
	if err != nil {
		t.Errorf(err.Error())
	}
	if bi.Uuid != "2023e709-39b4-47d7-8905-e8be3e6bc2c6" {
		t.Error(bi.Uuid)
	}
	if bi.Mac != "52:54:00:0d:bd:31" {
		t.Error(bi.Mac)
	}
	if bi.RandomId != "3492b948-cec6-4d6f-b008-cc98bf03c9d3" {
		t.Error(bi.RandomId)
	}
}

func Test1ParseCommandLine(t *testing.T) {
	//var c Config
	var err error
	var discoAddress = "http://127.0.0.1:5000"

	os.Setenv("DISCOVERY_ADDRESS", discoAddress)
	CONF, err = CreateConfig()
	if err != nil {
		t.Fail()
	}
	CONF.ProcCmdline = "tests" + CONF.ProcCmdline + "1"

	bi, err := ParseCommandLine()
	if err != nil {
		t.Errorf(err.Error())
	}
	if bi.Uuid != "ee378e7b-1575-425d-a6d6-e0dadb9f31a0" {
		t.Error(bi.Uuid)
	}
	if bi.Mac != "52:54:00:90:c3:9f" {
		t.Error(bi.Mac)
	}
	if bi.RandomId != "3492b948-cec6-4d6f-b008-cc98bf03c9d3" {
		t.Error(bi.RandomId)
	}
}

func Test2ParseCommandLine(t *testing.T) {
	//var c Config
	var err error
	var discoAddress = "http://127.0.0.1:5000"

	os.Setenv("DISCOVERY_ADDRESS", discoAddress)
	CONF, err = CreateConfig()
	if err != nil {
		t.Fail()
	}
	CONF.ProcCmdline = "tests" + CONF.ProcCmdline + "2"

	bi, err := ParseCommandLine()
	if err != nil {
		t.Errorf(err.Error())
	}
	if bi.Uuid != "62b58ffd-7960-419a-8359-91def082191a" {
		t.Error(bi.Uuid)
	}
	if bi.Mac != "52:54:00:71:83:ea" {
		t.Error(bi.Mac)
	}
	if bi.RandomId != "3492b948-cec6-4d6f-b008-cc98bf03c9d3" {
		t.Error(bi.RandomId)
	}
}
<commit_msg>Fix the random uuid gen<commit_after>package main

import (
	"testing"
	"os"
)

func Test0ParseCommandLine(t *testing.T) {
	//var c Config
	var err error
	var discoAddress = "http://127.0.0.1:5000"

	os.Setenv("DISCOVERY_ADDRESS", discoAddress)
	CONF, err = CreateConfig()
	if err != nil {
		t.Fail()
	}
	CONF.ProcCmdline = "tests" + CONF.ProcCmdline + "0"
	CONF.ProcBootId = "tests" + CONF.ProcBootId

	bi, err := ParseCommandLine()
	if err != nil {
		t.Errorf(err.Error())
	}
	if bi.Uuid != "2023e709-39b4-47d7-8905-e8be3e6bc2c6" {
		t.Error(bi.Uuid)
	}
	if bi.Mac != "52:54:00:0d:bd:31" {
		t.Error(bi.Mac)
	}
	if bi.RandomId != "3492b948-cec6-4d6f-b008-cc98bf03c9d3" {
		t.Error(bi.RandomId)
	}
}

func Test1ParseCommandLine(t *testing.T) {
	//var c Config
	var err error
	var discoAddress = "http://127.0.0.1:5000"

	os.Setenv("DISCOVERY_ADDRESS", discoAddress)
	CONF, err = CreateConfig()
	if err != nil {
		t.Fail()
	}
	CONF.ProcCmdline = "tests" + CONF.ProcCmdline + "1"

	bi, err := ParseCommandLine()
	if err != nil {
		t.Errorf(err.Error())
	}
	if bi.Uuid != "ee378e7b-1575-425d-a6d6-e0dadb9f31a0" {
		t.Error(bi.Uuid)
	}
	if bi.Mac != "52:54:00:90:c3:9f" {
		t.Error(bi.Mac)
	}
}

func Test2ParseCommandLine(t *testing.T) {
	//var c Config
	var err error
	var discoAddress = "http://127.0.0.1:5000"

	os.Setenv("DISCOVERY_ADDRESS", discoAddress)
	CONF, err = CreateConfig()
	if err != nil {
		t.Fail()
	}
	CONF.ProcCmdline = "tests" + CONF.ProcCmdline + "2"

	bi, err := ParseCommandLine()
	if err != nil {
		t.Errorf(err.Error())
	}
	if bi.Uuid != "62b58ffd-7960-419a-8359-91def082191a" {
		t.Error(bi.Uuid)
	}
	if bi.Mac != "52:54:00:71:83:ea" {
		t.Error(bi.Mac)
	}
}

{'fraction_non_alphanumeric': 0.17857142857142858, 'fraction_numerical': 0.09410430839002268, 'mean_word_length': 3.5653298835705045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '6857987', 'n_tokens_mistral': 1831, 'n_tokens_neox': 1667, 'n_words': 276}