fix tests

This commit is contained in:
Martin/Geno 2019-02-28 17:26:55 +01:00
parent 948fa0ddec
commit d20e749038
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A
8 changed files with 16 additions and 4 deletions

View File

@ -0,0 +1 @@
package capture

View File

@ -5,12 +5,12 @@ import (
"os/signal"
"syscall"
"dev.sum7.eu/genofire/golang-lib/file"
"github.com/bdlm/log"
"github.com/spf13/cobra"
"dev.sum7.eu/genofire/golang-lib/file"
"dev.sum7.eu/genofire/wifictld-analyzer/config"
"dev.sum7.eu/genofire/wifictld-analyzer/capture"
"dev.sum7.eu/genofire/wifictld-analyzer/config"
"dev.sum7.eu/genofire/wifictld-analyzer/controller"
"dev.sum7.eu/genofire/wifictld-analyzer/database"
)

1
cmd/root_test.go Normal file
View File

@ -0,0 +1 @@
package cmd

1
config/config_test.go Normal file
View File

@ -0,0 +1 @@
package config

1
controller/main_test.go Normal file
View File

@ -0,0 +1 @@
package controller

View File

@ -24,7 +24,7 @@ const (
func (a SocketMSGType) Is(b SocketMSGType) bool {
if DEBUG {
log.Debugf("SocketType: %x & %x = %x -> %b", a, b, (a & b), (a&b) > 0)
log.Debugf("SocketType: %x & %x = %x -> %t", a, b, (a & b), (a&b) > 0)
}
return (a & b) > 0
}

View File

@ -2,13 +2,20 @@ package data
import (
"encoding/hex"
"log"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/bdlm/log"
"github.com/bdlm/std/logger"
)
func init() {
DEBUG = true
log.SetLevel(logger.Debug)
}
func TestMsgIsTypes(t *testing.T) {
assert := assert.New(t)
types := SocketMSGType(5)

1
database/config_test.go Normal file
View File

@ -0,0 +1 @@
package database