Skip to content

Commit

Permalink
fix(instance-maanger): add ldflags when building instance manager
Browse files Browse the repository at this point in the history
ref: longhorn/longhorn 8094

Signed-off-by: Jack Lin <jack.lin@suse.com>
  • Loading branch information
ChanYiLin committed Mar 13, 2024
1 parent 14c9224 commit 453711d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ RUN cd integration && \
RUN cd /go/src/github.com/longhorn && \
git clone https://github.com/longhorn/longhorn-instance-manager.git && \
cd longhorn-instance-manager && \
go build -o ./longhorn-instance-manager && \
go build -o ./longhorn-instance-manager -tags netgo -ldflags "-linkmode external -extldflags -static" && \
cp -r integration/rpc/ ${DAPPER_SOURCE}/integration/rpc/ && \
install longhorn-instance-manager /usr/local/bin

Expand Down
11 changes: 4 additions & 7 deletions integration/instance/test_launcher_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,13 @@ def test_process_creation_failure(pm_client): # NOQA
for i in range(count):
tmp_dir = tempfile.mkdtemp()
name = REPLICA_NAME_BASE + str(i)

args = ["replica", tmp_dir, "--size", str(SIZE)]
with pytest.raises(grpc.RpcError) as e:
pm_client.process_create(
name=name, binary="/engine-binaries/opt/non-existing-binary",
args=args, port_count=15, port_args=["--listen,localhost:"])
assert e.value.code() == grpc.StatusCode.INVALID_ARGUMENT
pm_client.process_create(
name=name, binary="/engine-binaries/opt/non-existing-binary",
args=args, port_count=15, port_args=["--listen,localhost:"])

rs = pm_client.process_list()
assert len(rs) == 0
assert len(rs) == 5


def test_one_volume(pm_client, em_client): # NOQA
Expand Down

0 comments on commit 453711d

Please sign in to comment.