Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try to fix tests #205

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions node_funcs_master_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func TestNodeMasterGetNodes(t *testing.T) {
m := newContainerMaster(t)
defer m.close()

p := newContainer(t, "node-gen", m.IP())
p := newContainer(t, "node-generic", m.IP())
defer p.close()

n1, err := NewNode(NodeConf{
Expand All @@ -37,16 +37,16 @@ func TestNodeMasterGetNodes(t *testing.T) {

require.Equal(t, 4, len(res))

node, ok := res["/myns/nodegen"]
node, ok := res["/myns/nodegeneric"]
require.True(t, ok)

_, ok = node.PublishedTopics["/rosout"]
require.True(t, ok)

_, ok = node.ProvidedServices["/myns/nodegen/set_logger_level"]
_, ok = node.ProvidedServices["/myns/nodegeneric/set_logger_level"]
require.True(t, ok)

_, ok = node.ProvidedServices["/myns/nodegen/get_loggers"]
_, ok = node.ProvidedServices["/myns/nodegeneric/get_loggers"]
require.True(t, ok)

n2.Close()
Expand All @@ -61,7 +61,7 @@ func TestNodeMasterGetMachines(t *testing.T) {
m := newContainerMaster(t)
defer m.close()

p := newContainer(t, "node-gen", m.IP())
p := newContainer(t, "node-generic", m.IP())
defer p.close()

n, err := NewNode(NodeConf{
Expand Down
12 changes: 6 additions & 6 deletions node_funcs_node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ func TestNodeNodePing(t *testing.T) {

switch node {
case "cpp":
p := newContainer(t, "node-gen", m.IP())
p := newContainer(t, "node-generic", m.IP())
defer p.close()

case "go":
n1, err := NewNode(NodeConf{
Namespace: "/myns",
Name: "nodegen",
Name: "nodegeneric",
MasterAddress: m.IP() + ":11311",
})
require.NoError(t, err)
Expand All @@ -47,7 +47,7 @@ func TestNodeNodePing(t *testing.T) {
require.NoError(t, err)
defer n.Close()

_, err = n.NodePing("nodegen")
_, err = n.NodePing("nodegeneric")
require.NoError(t, err)
})
}
Expand All @@ -64,13 +64,13 @@ func TestNodeNodeKill(t *testing.T) {

switch node {
case "cpp":
p := newContainer(t, "node-gen", m.IP())
p := newContainer(t, "node-generic", m.IP())
defer p.close()

case "go":
n1, err := NewNode(NodeConf{
Namespace: "/myns",
Name: "nodegen",
Name: "nodegeneric",
MasterAddress: m.IP() + ":11311",
})
require.NoError(t, err)
Expand Down Expand Up @@ -104,7 +104,7 @@ func TestNodeNodeKill(t *testing.T) {
require.NoError(t, err)
defer n.Close()

err = n.NodeKill("nodegen")
err = n.NodeKill("nodegeneric")
require.NoError(t, err)

time.Sleep(1 * time.Second)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.8.3)

project(nodegen)
project(nodegeneric)

add_compile_options(-std=c++11 -Wall -Wextra)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt update && apt install -y --no-install-recommends \
make \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /catkin_ws/src/nodegen
WORKDIR /catkin_ws/src/nodegeneric

COPY CMakeLists.txt main.cpp package.xml ./

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <ros/ros.h>

int main(int argc, char **argv) {
ros::init(argc, argv, "nodegen");
ros::init(argc, argv, "nodegeneric");
ros::NodeHandle node;

ros::spin();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">

<name>nodegen</name>
<name>nodegeneric</name>
<version>0.0.0</version>
<description>empty</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export ROS_NAMESPACE=/myns

source /catkin_ws/install/setup.bash

rosrun nodegen nodegen
rosrun nodegeneric nodegeneric
Loading