MCPcopy
hub / github.com/dgraph-io/dgraph / mountBinary

Function mountBinary

dgraphtest/dgraph.go:458–474  ·  view source on GitHub ↗
(c *LocalCluster)

Source from the content-addressed store, hash-verified

456}
457
458func mountBinary(c *LocalCluster) (mount.Mount, error) {
459 // We shouldn't need to call setupBinary here, we already call it in LocalCluster.setupBeforeCluster
460 // function which is called whenever the dgraph's cluster version is initialized or upgraded. Though,
461 // we have observed "exec format error" when we don't do this. Our suspicion is that this is related
462 // to the fact that we mount same binary inside multiple docker containers. We noticed a similar
463 // issue with this PR when we mount same ACL secret file inside multiple containers.
464 if err := c.setupBinary(); err != nil {
465 return mount.Mount{}, err
466 }
467
468 return mount.Mount{
469 Type: mount.TypeBind,
470 Source: c.tempBinDir,
471 Target: goBinMountPath,
472 ReadOnly: true,
473 }, nil
474}
475
476// ShouldSkipTest skips a given test if clusterVersion < minVersion
477func ShouldSkipTest(t *testing.T, minVersion, clusterVersion string) {

Callers 2

mountsMethod · 0.85
mountsMethod · 0.85

Calls 1

setupBinaryMethod · 0.80

Tested by

no test coverage detected