<commit_before>package server

import (
	"fmt"
	"io/ioutil"
	"net"
	"net/http"
	"testing"

	"github.com/openshift/openshift-sdn/pkg/netutils"
)

func delIP(t *testing.T, delip string) error {
	url := fmt.Sprintf("http://127.0.0.1:9080/netutils/ip/%s", delip)
	req, err := http.NewRequest("DELETE", url, nil)
	if err != nil {
		t.Fatal("Error in forming request to IPAM server: %v", err)
	}
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		t.Fatal("Error in connecting to IPAM server: %v", err)
	}
	if res.StatusCode > 400 {
		return fmt.Errorf("Bad response from server: %d", res.StatusCode)
	}
	return err
}

func getIP(t *testing.T) string {
	res, err := http.Get("http://127.0.0.1:9080/netutils/ip")
	if err != nil {
		t.Fatal("Error in connecting to IPAM server: %v", err)
	}
	ip, err := ioutil.ReadAll(res.Body)
	if err != nil {
		t.Fatal("Error in obtaining IP address through server: %v", err)
	}<commit_msg>Fix error messages in server_test.go<commit_after>package server

import (
	"fmt"
	"io/ioutil"
	"net"
	"net/http"
	"testing"

	"github.com/openshift/openshift-sdn/pkg/netutils"
)

func delIP(t *testing.T, delip string) error {
	url := fmt.Sprintf("http://127.0.0.1:9080/netutils/ip/%s", delip)
	req, err := http.NewRequest("DELETE", url, nil)
	if err != nil {
		t.Fatalf("Error in forming request to IPAM server: %v", err)
	}
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		t.Fatalf("Error in connecting to IPAM server: %v", err)
	}
	if res.StatusCode > 400 {
		return fmt.Errorf("Bad response from server: %d", res.StatusCode)
	}
	return err
}

func getIP(t *testing.T) string {
	res, err := http.Get("http://127.0.0.1:9080/netutils/ip")
	if err != nil {
		t.Fatalf("Error in connecting to IPAM server: %v", err)
	}
	ip, err := ioutil.ReadAll(res.Body)
	if err != nil {
		t.Fatalf("Error in obtaining IP address through server: %v", err)
	}
{'fraction_non_alphanumeric': 0.1688865210442195, 'fraction_numerical': 0.024507192328183273, 'mean_word_length': 3.7908163265306123, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '2744668', 'n_tokens_mistral': 775, 'n_tokens_neox': 739, 'n_words': 192}