mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 02:47:48 +08:00
21 lines
378 B
Go
21 lines
378 B
Go
package flags
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
// This variable is initialized before flags init(), so we export the ENV variable here.
|
|
var _lowMemOn = lowMemOn()
|
|
|
|
func lowMemOn() error {
|
|
os.Setenv("IPFS_LOW_MEM", "true")
|
|
return nil
|
|
}
|
|
|
|
func TestLowMemMode(t *testing.T) {
|
|
if !LowMemMode {
|
|
t.Fatal("LowMemMode does not turn on even with 'IPFS_LOW_MEM' ENV variable set.")
|
|
}
|
|
}
|