|
|
download and install go
wget http://go.googlecode.com/files/go1.2.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.2.1.linux-amd64.tar.gz
# this is a hack, use soft links or install in the proper location the first time
sudo mv /usr/local/go/* /usr/bin
source build.sh
So first you need to make sure you have all the dependencies needed to build heka, the best way to find out is to Build heka.
If that works, make heka/build your current working directory and run either:
make test
or:
ctest
to test only the code you are changing run:h
# ctest -R [desired-test]
ctest -R tcp
This patch resolves a defect that causes the regexp default config delimiter to always be clobbered, now we check before we step.
modified: plugins/tcp/tcp_input.go
Here is the manual test case:
[TcpInput]
address = "127.0.0.1:5565"
parser_type = "regexp"
[STDOUT]
type = "LogOutput"
message_matcher = "TRUE"
payload_only = true
and I used netcat to test:
nc 127.0.0.1 5565
hello, heka!
I tried to run the unit tests in the code base with go test but I got errors about missing libraries ...
Ok, I learned from reviewing TravisCI output that I needed sudo apt-get install protobuf-compiler in order to run go test.
heka supports SSL, for testing I used self signed certs, it looked something like this:
On the outbound TCP hekad "client" configuration I added the following:
use_tls = true
[tcp:9612.tls]
insecure_skip_verify = true
On the inbound TCP hekad "server" configuration I added the following:
use_tls = true
[tcp:9612.tls]
cert_file = "/etc/ssl/certs/ssl-cert-snakeoil.pem"
key_file = "/etc/ssl/private/ssl-cert-snakeoil.key"
Notice that we are skipping crt verification which is susceptible to man-in-the-middle-attacks. Also we are not using client verification. Heka supports both.
Source: https://foxhop.net/f3e12ab2-2f95-11f1-9e11-e86a64d24d78/building-heka
Snapshot: 2026-05-25T00:28:32Z
Generator: Remarkbox 1527ef7