Skip to content

Commit

Permalink
rebased branch amqp
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Paulmyer committed Feb 9, 2016
1 parent e973db0 commit 4100e35
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 52 deletions.
10 changes: 1 addition & 9 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@
#
# solaris
# -------------------
<<<<<<< HEAD
# - Use gmake instead of make.
#
# freebsd
# -------------------
# - Use gmake instead of make.
# - Folder syncing doesn't work well. Consider copying the files into the box or
# cloning the project inside the box.
=======
# More development boxes can be added to this file and you can run commands
# like "vagrant up solaris" or "vagrant up winxp" to start them.
>>>>>>> amqp protocol

# Provisioning for Windows PowerShell
$winPsProvision = <<SCRIPT
Expand Down Expand Up @@ -64,10 +59,7 @@ Vagrant.configure(2) do |config|

# Windows Server 2012 R2
config.vm.define "win2012", primary: true do |win2012|
<<<<<<< HEAD
=======
# Windows Server 2012 R2
>>>>>>> amqp protocol

win2012.vm.box = "https://s3.amazonaws.com/beats-files/vagrant/beats-win2012-r2-virtualbox-2016-01-20_0057.box"
win2012.vm.guest = :windows

Expand Down
25 changes: 0 additions & 25 deletions libbeat/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ build: $(GOFILES)
# Create test coverage binary
.PHONY: buildbeat.test
buildbeat.test: $(GOFILES)
<<<<<<< HEAD
go test $(RACE) -c -coverpkg ${GOPACKAGES_COMMA_SEP}
=======
go test -c -covermode=atomic -coverpkg ${GOPACKAGES_COMMA_SEP}
>>>>>>> amqp protocol

# Cross-compile beat for the OS'es specified in GOX_OS variable.
# The binaries are placed in the build/bin directory.
Expand All @@ -75,11 +71,7 @@ crosscompile: $(GOFILES)
# Checks project and source code if everything is according to standard
.PHONY: check
check:
<<<<<<< HEAD
@gofmt -l ${GOFILES_NOVENDOR} | (! grep . -q) || (echo "Code differs from gofmt's style" && false)
=======
@gofmt -l ${GOFILES_NOVENDOR} | read && echo "Code differs from gofmt's style" 1>&2 && exit 1 || true
>>>>>>> amqp protocol
go vet ${GOPACKAGES}

# Runs gofmt -w on the project's source code, modifying any files that do not
Expand Down Expand Up @@ -145,18 +137,12 @@ integration-tests-environment:

# Runs the system tests
.PHONY: system-tests
<<<<<<< HEAD
system-tests: buildbeat.test prepare-tests python-env
. ${PYTHON_ENV}/bin/activate; nosetests -w tests/system --process-timeout=$(TIMEOUT) --with-timer
=======
system-tests: buildbeat.test prepare-tests system-tests-setup
. build/system-tests/env/bin/activate; nosetests -w tests/system --process-timeout=$(TIMEOUT) --with-timer
>>>>>>> amqp protocol
python ${ES_BEATS}/dev-tools/aggregate_coverage.py -o ${COVERAGE_DIR}/system.cov ./build/system-tests/run

# Runs system tests without coverage reports and in parallel
.PHONY: fast-system-tests
<<<<<<< HEAD
fast-system-tests: buildbeat.test python-env
. ${PYTHON_ENV}/bin/activate; nosetests -w tests/system --processes=$(PROCESSES) --process-timeout=$(TIMEOUT)

Expand All @@ -169,17 +155,6 @@ python-env: ${ES_BEATS}/libbeat/tests/system/requirements.txt
else \
. ${PYTHON_ENV}/bin/activate && pip install -Ur ${ES_BEATS}/libbeat/tests/system/requirements.txt ; \
fi
=======
fast-system-tests: buildbeat.test system-tests-setup
. build/system-tests/env/bin/activate; nosetests -w tests/system --processes=$(PROCESSES) --process-timeout=$(TIMEOUT)

.PHONY: system-tests-setup
system-tests-setup: tests/system/requirements.txt
test -d env || virtualenv build/system-tests/env > /dev/null
. build/system-tests/env/bin/activate && pip install -Ur tests/system/requirements.txt > /dev/null
touch build/system-tests/env/bin/activate

>>>>>>> amqp protocol

# Run benchmark tests
.PHONY: benchmark-tests
Expand Down
8 changes: 4 additions & 4 deletions packetbeat/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ type Icmp struct {
}

type Amqp struct {
ProtocolCommon `yaml:",inline"`
ParseHeaders *bool `yaml:"parse_headers"`
ParseArguments *bool `yaml:"parse_arguments"`
MaxBodyLength *int `yaml:"max_body_length"`
ProtocolCommon `yaml:",inline"`
ParseHeaders *bool `yaml:"parse_headers"`
ParseArguments *bool `yaml:"parse_arguments"`
MaxBodyLength *int `yaml:"max_body_length"`
HideConnectionInformation *bool `yaml:"hide_connection_information"`
}

Expand Down
14 changes: 0 additions & 14 deletions packetbeat/tests/system/packetbeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,15 @@ class BaseTest(TestCase):
@classmethod
def setUpClass(self):
self.beat_name = "packetbeat"
<<<<<<< HEAD
super(BaseTest, self).setUpClass()

=======
self.build_path = "../../build/system-tests/"
self.beat_path = "../../packetbeat.test"
>>>>>>> amqp protocol

def run_packetbeat(self, pcap,
cmd="../../packetbeat.test",
config="packetbeat.yml",
output="packetbeat.log",
extra_args=[],
<<<<<<< HEAD
debug_selectors=[],
exit_code=0):
=======
debug_selectors=[]):
>>>>>>> amqp protocol
"""
Executes packetbeat on an input pcap file.
Waits for the process to finish before returning to
Expand All @@ -60,13 +50,9 @@ def run_packetbeat(self, pcap,
proc = subprocess.Popen(args,
stdout=outputfile,
stderr=subprocess.STDOUT)
<<<<<<< HEAD
actual_exit_code = proc.wait()
assert actual_exit_code == exit_code, "Expected exit code to be %d, but it was %d" % (exit_code, actual_exit_code)
return actual_exit_code
=======
return proc.wait()
>>>>>>> amqp protocol

def start_packetbeat(self,
cmd="../../packetbeat.test",
Expand Down

0 comments on commit 4100e35

Please sign in to comment.